1. Field of the Invention
The present invention relates to a document layout processing device for automatically generating a document layout structure based on the contents of a document in accordance with restrictions on the document layout.
2. Description of the Related Art
There have been proposed document processing models as the basis of a document processing technique which automatically generates a document layout structure in accordance with the contents of the document (hereinafter referred to as document layout processing) Such models include ODA (ISO863: Information Processing-Text and Office Systems-Open Document Architecture (ODA) and Interchange Format (1989)) and tnt (J. Andre, R. Furuta, V. Quint: Structured Documents, Cambridge University Press (1989) or LATEX (L. Lamport: LATEX: A Document Preparation System, Addison-Wesley Publishing Company, Inc. (1986)). Layout processing devices on the basis of these models are realized. For example, a layout processing device on the basis of the ODA is disclosed in Published Unexamined Patent Applications Hei 2-157067 and Hei 2-157068 filed in Japan by the same applicant as that of this application.
Such layout processing devices have rendered it possible to automatically determine the position of a frame in accordance with a quantity of contents to be laid out without manually laying out the frame at a specified position on a page.
However, in such conventional devices, the generated layout structure is of nested rectangular areas. When rectangular areas are required to have same dimensions, a rectangular area which encloses these rectangular areas is required. For example, when a layout as shown in FIG. 56(a) is desired, a structure expressed by the conventional model is as shown in FIG. 56(b). If there are rectangular areas whose nesting levels are the same, the sequence of laying out logical structures to those rectangular areas is uniquely determined, for example, from an upper area to a lower one.
In FIG. 56(b), a rectangular area 1, a figure area and a rectangular area 2 are at the same nesting level, so that logical structures are laid out in the sequence of the rectangular area 1, figure area and rectangular area 2. Since sentence areas 1 and 2 in the rectangular area 1 are at the same nesting level, logical structures are laid out in the sequence of sentence areas 1 and 2. This applies to sentence areas 3 and 4 in the rectangular area 2. As a result, in this example, the sentence contents which the logical structures have can be laid out in accordance with the sequence of sentence areas 1, 2, 3 and 4.
However, the above-described document layout processing raises a problem when laying out a multi-column document. FIG. 57(a) shows an example of a manual layout in which a heading frame covering two columns appears for each paragraph heading in a basic page of 3 columns. In this example, heading frames are alternately laid out depending on quantities of contents of paragraphs. However, the conventional document layout processing cannot automatically generate such a layout structure with alternate heading frames.
This is because, in the layout of the "heading" shown in FIG. 57(a), the contents of the document are generally laid out in the sequence of areas 1, 2 . . . , 7, as shown in FIG. 57(b). In the case that nests for rectangular areas are defined such that headings are alternately laid out with equal column heights, the layout structure is shown in FIG. 58 in which the sequence of layout of the document contents is areas 1, 2, 3 . . . , and 11 in accordance with the uniqueness of the sequence of layout according to nesting level. This structure differs from that shown in FIG. 57(b). As seen from the foregoing description, the conventional document layout processing cannot perform alternate disposition of headings and layout of document contents at appropriate positions at the same time. Thus, a layout structure with alternate heading frames cannot be generated automatically.
In addition to the layout design described above, there is a layout design often used in general documents in which the contents of a text laid out in a column continue to an area next to a figure area which extends to that column by jumping the figure area. This, for example, corresponds to the layout of sentences in the sequence of areas 1, 3, 2 and 4 shown in FIG. 56(b). When this layout design is used, it is often the case that the sentences in the last line of the area 1 or 2 refer to the contents of the figure. However, the conventional document layout technique cannot automatically generate such layout structure due to the requirement of rectangular areas used to provide equal column heights and the uniqueness of the sequence of the layout based on the nesting levels.
In addition, there is still another layout design often employed in general documents as shown in FIG. 59(a), in which a heading which covers three columns and a heading which covers one or two columns co-exist. In order to realize this design, the conventional document layout is required to use the layout of rectangular areas such as that shown in FIG. 59(b). However, when the contents of one document are laid out to rectangular areas having different nesting levels, as shown by areas 1, 2 and 3 in FIG. 59(b), the heights of areas 1 and 2 cannot automatically be determined such that the upper edges of areas 1 and 2 coincide at the level shown by the arrow A (shown by the doubled lines) in FIG. 59(b). Coexistence of a frame covering all the columns and frames covering some of the columns cannot be treated by conventional document layout techniques.